package com.xiaohua.api.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * API文件信息实体类
 * 
 * @author 小花
 * @date 2025-04-07
 */
public class XhApiFile implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 文件ID */
    private Long fileId;
    
    /** 用户ID */
    private Long userId;
    
    /** 文件名 */
    private String fileName;
    
    /** 文件类型 */
    private String fileType;
    
    /** 存储路径 */
    private String storagePath;
    
    /** 是否加密 */
    private Integer isEncrypted;
    
    /** 加密密钥 */
    private String encryptionKey;
    
    /** 创建时间 */
    private Date createdAt;

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getStoragePath() {
        return storagePath;
    }

    public void setStoragePath(String storagePath) {
        this.storagePath = storagePath;
    }

    public Integer getIsEncrypted() {
        return isEncrypted;
    }

    public void setIsEncrypted(Integer isEncrypted) {
        this.isEncrypted = isEncrypted;
    }

    public String getEncryptionKey() {
        return encryptionKey;
    }

    public void setEncryptionKey(String encryptionKey) {
        this.encryptionKey = encryptionKey;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
    
    /**
     * 构建器模式创建实例
     */
    public static Builder builder() {
        return new Builder();
    }
    
    /**
     * 构建器
     */
    public static class Builder {
        private XhApiFile file;
        
        public Builder() {
            file = new XhApiFile();
        }
        
        public Builder userId(Long userId) {
            file.setUserId(userId);
            return this;
        }
        
        public Builder fileName(String fileName) {
            file.setFileName(fileName);
            return this;
        }
        
        public Builder fileType(String fileType) {
            file.setFileType(fileType);
            return this;
        }
        
        public Builder storagePath(String storagePath) {
            file.setStoragePath(storagePath);
            return this;
        }
        
        public Builder isEncrypted(Integer isEncrypted) {
            file.setIsEncrypted(isEncrypted);
            return this;
        }
        
        public Builder encryptionKey(String encryptionKey) {
            file.setEncryptionKey(encryptionKey);
            return this;
        }
        
        public Builder createdAt(Date createdAt) {
            file.setCreatedAt(createdAt);
            return this;
        }
        
        public XhApiFile build() {
            return file;
        }
    }
} 